import styled, {keyframes} from 'styled-components'
import LogoUrl from '../../statics/logo.png'

const fadeIn = keyframes`
  0% {
    width: 100px;
  }
  100% {
    width: 200px;
  }
`;

export const HeaderWrapper = styled.div`
  height: 56px;
  border-bottom: 1px solid #f0f0f0;
`
export const Logo = styled.div`
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100px;
  height: 56px;
  background: url(${LogoUrl});
  background-size: contain;
`
export const Nav = styled.div`
  width: 960px;
  margin: 0 auto;
  height: 100%
`
export const NavItem = styled.div`
  &.left {
    float: left
  };
  &.right {
    float: right;
    color: #969696;
    padding: 0 15px;
  };
  &.active {
    color: #ea6f5a
  };
  &.login {
    padding: 0 65px 0 15px;
  };
  line-height: 56px;
  font-size: 17px;
  padding: 0 15px;
`
export const NavSearch = styled.input.attrs({
  placeholder: 'search'
})`
  width: 160px;
  height: 38px;
  outline: none;
  border: none;
  margin-top: 9px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: 19px;
  background: #eee;
  z-index: 999;
  &.focused {
    width: 240px;
    animation: 0.5s ${fadeIn} ease-out forwards ;
  }
`
export const Addition = styled.div`
  position: absolute;
  top: 0;
  right: 0;
  height: 56px;
`
export const ButtonTitle = styled.div`
  float: right;
  line-height:38px;
  width: 60px;
  text-align: center;
  font-size: 17px;
  border-radius: 19px;
  border: 1px solid #ea6149;
  margin-top: 9px;
  margin-right: 16px;
  &.write{
    color: #fff;
    background-color: #ea6f5a;
    width: 60px;
  }
`
export const Recommend = styled.div`
  position:absolute;
  top: 56px;
  left:300px;
  width:240px;
  padding: 0 20px 20px 20px;
  background: #fff;
  z-index: 999;
  box-shadow: 0 0 8px rgba(0,0,0,.2)
`
export const RecommendTitle = styled.div`
  font-size: 14px;
  color: #969696;
  margin-top:20px;
  line-height: 20px;
  margin-bottom:15px;
`
export const RecommendIcon = styled.span`
  font-size: 14px;
  float:right;
`
export const RecommendList = styled.ul`
  display:flex;
  flex-wrap: wrap;
`
export const RecommendItem = styled.li`
  text-align:center;
  margin: 5px ;
  padding: 2px;
  font-size: 14px;
  border: 1px solid black;
  justify-content: space-around;
  height:20px;
`
